Skip to content

Fix #14632 FN funcArgNamesDifferent when argument is unnamed#8399

Open
chrchr-github wants to merge 12 commits intodanmar:mainfrom
chrchr-github:chr_14632
Open

Fix #14632 FN funcArgNamesDifferent when argument is unnamed#8399
chrchr-github wants to merge 12 commits intodanmar:mainfrom
chrchr-github:chr_14632

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

No description provided.

checkersReport

# warnings in Qt generated code we cannot fix
funcArgNamesDifferent:*/moc_aboutdialog.cpp
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest that we just always ignore such warnings in moc output. Write */moc_*.cpp as filename

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general I disagree because we want to have more granular ones in case they are false positives.

naming-privateMemberVariable:externals/tinyxml2/tinyxml2.h
functionStatic:externals/tinyxml2/tinyxml2.cpp
funcArgNamesDifferent:externals/tinyxml2/tinyxml2.cpp
funcArgNamesDifferent:externals/tinyxml2/tinyxml2.h
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about ignoring such warnings in all externals funcArgNamesDifferent:externals/**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep granular warnings - since we control when this code is updated I would argue we should be even using more granular suppressions with lines so to properly differentiate them as this might suppress/obfuscate fixes/regressions.

There are also also mainly true positives and need to be fixed upstream. Unfortunately landing fixes has not been that successful in the past. I will take another try in the future.

void resizeEvent(QResizeEvent *event) override;

private slots:
void updateLineNumberAreaWidth(int newBlockCount);
Copy link
Copy Markdown
Owner

@danmar danmar Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Providing the argument name in the declaration looks like good proper clean code to me. Even if argument name is empty in definition.
It's not a likely "mistake" imho.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is still provided in a comment. Having the information that the parameter is unused in a header file also informs the user of e.g. a library.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 9, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants